﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
             xmlns:ctrl="clr-namespace:MediaOwl.Common.ControlTemplates;assembly=MediaOwl.Common"
             xmlns:cal="http://www.caliburnproject.org"
             x:Class="MediaOwl.Views.ShellView"
             mc:Ignorable="d"
             d:DesignHeight="462"
             d:DesignWidth="656">

    <Grid>
        <Grid.Background>
            <ImageBrush Stretch="UniformToFill"
                        ImageSource="/MediaOwl;component/Resources/Images/noise.jpg"
                        Opacity="0.4" />
        </Grid.Background>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="AppTitleStates">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0:0:0.4" />
                </VisualStateGroup.Transitions>
                <VisualState x:Name="Normal">
                    <Storyboard>
                        <DoubleAnimation Duration="0"
                                         To="0.35"
                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                         Storyboard.TargetName="DisplayName"
                                         d:IsOptimized="True" />
                        <DoubleAnimation Duration="0"
                                         To="0.35"
                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                         Storyboard.TargetName="rectangle"
                                         d:IsOptimized="True" />
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                    <Storyboard>
                        <DoubleAnimation Duration="0"
                                         To="1"
                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                         Storyboard.TargetName="rectangle"
                                         d:IsOptimized="True" />
                        <DoubleAnimation Duration="0"
                                         To="0.75"
                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                         Storyboard.TargetName="DisplayName"
                                         d:IsOptimized="True" />
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Rectangle Fill="{StaticResource OverlayBrush}"
                   Stroke="{StaticResource TreeViewItemSelectionBorder}"
                   StrokeThickness="2"
                   RenderTransformOrigin="0.5,0.5">
            <Rectangle.RenderTransform>
                <CompositeTransform Rotation="180" />
            </Rectangle.RenderTransform>
        </Rectangle>
        <toolkit:DockPanel Margin="10">
            <StackPanel toolkit:DockPanel.Dock="Top"
                        Orientation="Horizontal"
                        Margin="20">
                <Rectangle x:Name="rectangle"
                           Height="100"
                           Margin="0"
                           ToolTipService.ToolTip="MediaOwl"
                           Width="100"
                           HorizontalAlignment="Left"
                           Opacity="0.35">
                    <Rectangle.Fill>
                        <ImageBrush Stretch="Uniform"
                                    ImageSource="/MediaOwl;component/Resources/Images/mediaowl.png" />
                    </Rectangle.Fill>
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="MouseEnter">
                            <ei:GoToStateAction StateName="MouseOver" />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="MouseLeave">
                            <ei:GoToStateAction StateName="Normal" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Rectangle>
                <TextBlock x:Name="DisplayName"
                           TextWrapping="Wrap"
                           Text="Media Owl"
                           VerticalAlignment="Center"
                           Style="{StaticResource ApplicationNameStyle}"
                           FontSize="48"
                           Opacity="0.345">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseEnter">
							<ei:GoToStateAction StateName="MouseOver" />
						</i:EventTrigger>
						<i:EventTrigger EventName="MouseLeave">
							<ei:GoToStateAction StateName="Normal" />
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock.Effect>
						<DropShadowEffect BlurRadius="1"
                                          Direction="343"
                                          ShadowDepth="2" />
					</TextBlock.Effect>
                </TextBlock>
            </StackPanel>
            <toolkit:TransitioningContentControl x:Name="ActiveItem"
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch" Style="{StaticResource TransitioningContentControlExpanded}" Transition="FlipToRightTransition" />
        </toolkit:DockPanel>
        <ctrl:DialogIndicator cal:View.Model="{Binding CurrentBusyViewModel}"
                              d:IsHidden="True" />
        <ctrl:DialogIndicator cal:View.Model="{Binding ActiveDialog}"
                              d:IsHidden="True" />
    </Grid>
</UserControl>
